GitLab 重置密码
GitLab in docker
进入到容器当中
$ docker exec -it gitlab /bin/bash
Ruby on Rails console
$ gitlab-rails console -e production
查找
root
用户irb(main):006:0> user = User.where(id: 1).first
或者按照邮箱查找用户
irb(main):006:0> user = User.find_by(email: 'admin@example.com')
重置密码(要求不少于8位)
irb(main):006:0> user.password = 'suofeiya'
irb(main):006:0> user.password_confirmation = 'suofeiya'保存更改
irb(main):006:0> user.save!